package com.aquan.map_jetpack.ui.components


import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.tooling.preview.Preview
import com.airbnb.lottie.compose.*

@Composable
fun Loading() {
    val lottieComposition by rememberLottieComposition(spec = LottieCompositionSpec.Url("https://assets9.lottiefiles.com/packages/lf20_rbtawnwz.json"))
    val lottieAnimationState by animateLottieCompositionAsState(
        composition = lottieComposition,
        iterations = LottieConstants.IterateForever
    )
    LottieAnimation(composition = lottieComposition, progress = lottieAnimationState)
}

@Preview
@Composable
fun LoadingPreview() {
    Loading()
}

